package edu.nwpu.pojo;

import java.util.List;

public class User {

    /**
     * 用户ID
     */
    private Long id;
    
    /**
     * 用户名，限2-12个中文、英文或数字，必须唯一
     * username, limited to 2-12 chinese, english or numbers, must unique
     */
    private String name;

    /**
     * 用户密码
     * user's password
     */
    private String password;

    /**
     * 用户电话号码
     * user's phone number
     */
    private String phoneNo;

    /**
     * 收货信息
     * a list storing user's receiving information
     */
    private List<RecvInfo> recvInfos;

    /**
     * 订单记录，包括正在处理的订单和历史订单
     * order records, including orders being processed and historical orders
     */
    private List<Order> orderRecords;

    public User() {
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getPhoneNo() {
        return phoneNo;
    }

    public void setPhoneNo(String phoneNo) {
        this.phoneNo = phoneNo;
    }

    public List<RecvInfo> getRecvInfos() {
        return recvInfos;
    }

    public void setRecvInfos(List<RecvInfo> recvInfos) {
        this.recvInfos = recvInfos;
    }

    public List<Order> getOrderRecords() {
        return orderRecords;
    }

    public void setOrderRecords(List<Order> orderRecords) {
        this.orderRecords = orderRecords;
    }

    public User(Long id, String name, String password, String phoneNo, List<RecvInfo> recvInfos, List<Order> orderRecords) {
        this.id = id;
        this.name = name;
        this.password = password;
        this.phoneNo = phoneNo;
        this.recvInfos = recvInfos;
        this.orderRecords = orderRecords;
    }

    @Override
    public String toString() {
        return "User{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", password='" + password + '\'' +
                ", phoneNo='" + phoneNo + '\'' +
                ", recvInfos=" + recvInfos +
                ", orderRecords=" + orderRecords +
                '}';
    }
}
